/**
  ******************************************************************************
  * @file    main.h
  * $Author: wdluo $
  * $Revision: 17 $
  * $Date:: 2012-07-06 11:16:48 +0800 #$
  * @brief   主函数包含的头文件.
  ******************************************************************************
  * @attention
  *
  *<h3><center>&copy; Copyright 2009-2012, ViewTool</center>
  *<center><a href="http:\\www.viewtool.com">http://www.viewtool.com</a></center>
  *<center>All Rights Reserved</center></h3>
  * 
  ******************************************************************************
  */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_conf.h"
#include "usart.h"
#include "delay.h"
#include "spi.h"
#include "socket.h"	// Just include one header for WIZCHIP
#include "dhcp.h"
//-----------------------
#include "mb.h"  //FreeModbus
#include "mbport.h"
#define SOCK_TCPS        2
#define SOCK_UDPS        1
#define SOCK_DHCP        0

#define DATA_BUF_SIZE   2048
#define MY_MAX_DHCP_RETRY	3
//------------------------------------------------------------
#define Modbus_Ports    2500
#define SOCK_Modebus     3
/* Exported Functions --------------------------------------------------------*/
void my_ip_assign(void);
void my_ip_conflict(void);
void modbus_tcps(uint8_t sn, uint16_t port);
void platform_init(void);								// initialize the dependent host peripheral
void network_init(void);								// Initialize Network information and display it
int32_t loopback_tcps(uint8_t, uint8_t *, uint16_t);		// Loopback TCP server
int32_t loopback_udps(uint8_t, uint8_t *, uint16_t);		// Loopback UDP server


#endif /* __MAIN_H */

/*********************************END OF FILE**********************************/
